<script setup>
import { ref } from "vue";
import { getCaptcha } from "@/api/captcha.js";

// 存储验证码图片的URL，初始带一个随机参数避免缓存
const captchaSrc = ref(
  "http://localhost:8080/captcha?timestamp=" + new Date().getTime()
);
</script>

<template>
  <div>
    <img :src="captchaSrc" alt="" />
  </div>
</template>

<style scoped lang="scss">
img {
  width: 100px;
  height: 40px;
  border: 1px solid black;
}
</style>
